#define _CRT_SECURE_NO_WARNINGS 1
#include <stdbool.h>
#include <string.h>

bool isValid(char* s)
{
    int len = strlen(s);
    ++s;
    int num = 2;
    if (len / 2 == 1)
        return false;
    while (num <= len)
    {
        if (*s == ')' && *(s - 1) == '(')
        {
            s += 2;
            num += 2;
        }
        else if (*s == ']' && *(s - 1) == '[')
        {
            s += 2;
            num += 2;
        }
        else if (*s == '}' && *(s - 1) == '{')
        {
            s += 2;
            num += 2;
        }
        else
            return false;
    }
    return true;
}


int main()
{
    char arr[] = "()";
    bool ret = isValid(arr);
    return 0;
}